package com.ak.common.entity.system;

import com.ak.common.entity.Tree;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@TableName("sys_dept")
@Excel("部门信息表")
@EqualsAndHashCode(callSuper = false)
public class Dept extends Tree<Dept> implements Serializable {

    private static final long serialVersionUID = -7790334862410409053L;

    @TableId(value = "dept_id", type = IdType.UUID)
    private String deptId;

    @NotBlank(message = "{required}")
    @Size(max = 20, message = "{noMoreThan}")
    @ExcelField(value = "部门名称")
    private String deptName;

    private Integer sort;

    /**
     * 所属租户 新增部门时，租户code为当前登录用户的租户code
     */
    private String tenantCode;



    private transient String createTimeFrom;

    private transient String createTimeTo;

}
